package com.system.controller;

import com.system.pojo.SysRole;
import com.system.service.SysRoleService;
import com.system.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author yjymm
 * @date 2019-12-17 21:31
 */

@Controller
@ResponseBody
@RequestMapping("/sysRole")
public class SysRoleController {

    @Autowired
    private  SysRoleService sysRoleService;

    @RequestMapping("/selectAll")
    public ResultVo<SysRole> selectAll(){
        ResultVo<SysRole> resultVo = new ResultVo<SysRole>();
        try {
            resultVo = sysRoleService.selectAll();
        }catch (Exception e){
            e.printStackTrace();
            resultVo.setMessage("查询失败");
        }finally {
            return resultVo;
        }
    }


}
